﻿using MyFloridaHouse.libSvDTO;
using MyFloridaHouse.libSvOpenDistricts.Districts;

namespace MyFloridaHouse.libSvOpenDistricts.PDF
{
    public class HouseMapLayoutRegionalMiamiDade : HouseMap
    {
        public HouseMapLayoutRegionalMiamiDade(PDF_DAL pdfDAL, enumDistrictPlanPDFPrintSizes pageSize, DistrictPlan districtPlan, string mainTitle)
            : base(pdfDAL, pageSize, districtPlan, mainTitle)
        {
            double currentZoomLevel;

            if (enumDistrictPlanPDFPrintSizes._8x11 == pageSize)
            {
                // SMALL
                this.pageOrientation = enumPDFPageOrientation.Landscape;
                currentZoomLevel = 12;
            }
            else
            {
                // LARGE
                this.pageOrientation = enumPDFPageOrientation.Portrait;
                currentZoomLevel = 40;
            }


            // all insert origins and widths are in percent of the mapBorder, makes it very easy to specify
            HouseMapInset inset;

            inset = new HouseMapInset(0.0, 0.0, 1.0, 1.0, miamiDadeBoundingBoxLatLon, currentZoomLevel, true);
            inset.mapLayerRegionsList.Add(new HouseMapLayerRegions(HouseMapShapeTypes.shorelines));
            inset.mapLayerRegionsList.Add(new HouseMapLayerRegions(HouseMapShapeTypes.majorHighways));
            inset.mapLayerRegionsList.Add(new HouseMapLayerRegions(HouseMapShapeTypes.expressways));
            inset.mapLayerRegionsList.Add(new HouseMapLayerRegions(HouseMapShapeTypes.counties));
            insetList.Add(inset);

            GetDataAndDrawDocument();
        }
    }
}
